<template>
  <wl-list class="wl-content-container" :listData="myState" @pageChange="pageChange" @sizeChange="sizeChange">
    <wl-query :needAdv="false" slot="query"  @doQuery="doQuery">
      <template slot="main">
          <el-form :model="mainData" class="form-query"  label-width="70px" >
            <wl-form-item :importance="false" label="部门" prop="name"   :itemData="mainData">
                <wl-arr-select reqUrl="/dept/list.do" :isMore="false" slot="input" slot-scope="col" type="name"  :rawData="col.columnData"></wl-arr-select>
            </wl-form-item>
            <wl-form-item :importance="false" label="负责人" prop="leader_list" :itemData="mainData">
                <wl-arr-select reqUrl="/account/list.do" :isMore="true" slot="input" slot-scope="col" type="leader_list"  :rawData="col.columnData"></wl-arr-select>
            </wl-form-item>
          </el-form>
      </template>
    </wl-query>
    <wl-tree-table  slot="table"  :data="myState.data_list" :evalFunc="myState.func" @expand="expand" @add="rowAdd" @edit="rowEdit" @delete="rowDelete" :evalArgs="myState.args" :expandAll="myState.expandAll" border>
      <el-table-column prop="id" label="部门编号"></el-table-column>
      <el-table-column slot="scope_tree" prop="name" label="部门名称"></el-table-column>
      <el-table-column prop="leader_list" label="负责人">
        <template slot-scope="scope">
         <wl-column field="name" :rawData="scope.row.leader_list"></wl-column>
        </template>
      </el-table-column>
      <el-table-column prop="mem_num" label="部门人数"></el-table-column>     
    </wl-tree-table>
  </wl-list>
</template>
<script lang="ts" src="./org.ts"></script>

